package com.qd.panda.gas.station.req;

import com.qd.common.sys.domain.entity.log.SendLogDTO;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Optional;

/**
 * 个人订单
 *
 * @author sjk
 * @create 2022-10-08 16:18
 * @since 1.0.0
 */
@Data
@Accessors(chain = true)
@ToString
public class HistoryOrderReqDTO {
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 加油站ID
     */
    private List<String> stationList;
    /**
     * 当前页数
     */
    private Integer pageNumber;
    /**
     * 记录日志
     */
    private SendLogDTO sendLog;

    public void freeData() {
        this.mobile = null;
        Optional.ofNullable(stationList).ifPresent(List::clear);
        this.sendLog = null;
        this.pageNumber = null;
        //不清空sendLog
    }
}